package com.example.sys.entity.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class LoginUserInfoVo {
    private Long userId;    //用户id

    private UserInfo userInfo; //用户信息
    private List<RoleInfo> roleList;    //角色

    private Token token; //令牌

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class UserInfo{
        private long userId;    //用户id
        private String userName;//用户名
        private String nickName;//昵称
        private String avatar;  //头像
        private String iphoneNo;//手机号
        private String emailAddress;//邮箱地址
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class RoleInfo{
        private Long roleId;
        private String roleName;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public static class Token{
        private String accessToken;     //访问令牌
        private String refreshToken;    //刷新令牌
    }
}
